import time,pytest

import yaml
from lr9_9.Tools import Tools
from lr9_9.Page.Page import Page
from lr9_9.Page.Page2 import Page
from lr9_9.Page.Page3 import Page
from selenium import webdriver

def read_yaml():
    with open(r'E:\zhuangao\lr9_9\aa.yaml') as e:
        return yaml.safe_load(e)
aa = read_yaml()
@pytest.fixture
def driver():
    driver = webdriver.Chrome()
    driver.maximize_window()
    yield driver

    time.sleep(5)
    driver.quit()

@pytest.mark.parametrize('bb',aa)
def test_A3mall(driver,bb):
    po = Page(driver)
    po.test_A3mall_003(bb.get('username'),bb.get('password'))
